COLORS V1.0 =========== By Keith Johnson ================ About this file: ---------------- This is the ProWrite version of the Colors doc file. Along with this file should be: Colors - the game itself ColorsHiUtil - high score file utility ColorsDoc.prw - the ProWrite version of this doc file ColorsDoc.txt - the ascii doc file (this file) Versions.txt - history file of the versions of this game ColorsHi.abk - the high score file ColorsHiUtilDoc.txt - information about the high score utility MoreMe - any other miscellaneous information Fonts - a directory with fonts for use with this file. I realize that in this doc file that I tend to be a bit verbose, but I only do it to make myself totally clear to everyone who reads this. There is a lot of technical information in here for those really interested, but if you're not, please make sure you at least glance over everything so you know what you're doing and you don't mess anything up. Just remember to turn off your screen savers/blankers!! About this program: =================== The object of COLORS is simply to form lines of four blocks or more of the same colors. Pieces which consist of three blocks are randomly picked and then fall down in a T*tris-like style. There are four different colors with which you can form lines, so there are technically 64 different pieces, but since they can be rotated, there are (I think) only 34 different pieces. The bigger the lines that you form are, the more points you get. Also, if you clear more than one color at a time, your score is multiplied. All of this is explained in detail later. COLORS is written with the highly fantastic program AMOS V1.32. If you don't have it, I would highly consider getting it. That is, if you are a BASIC fan. I have programmed in BASIC for a heck of a lot of my life so far, and I still like it better than any other language I know (PASCAL, C, 68k assembly, 6502 assembly(!)). Anyway, after spending much time writing and debugging this thing, it was compiled with the AMOS Compiler. If you have AMOS, then get the compiler!! Otherwise, this program would've been much more of a pain to run and distribute. I have an Amiga 3000UX (that means UNIX is on here) with one floppy drive, the standard 5 megs o' RAM, a 100 MB hard drive that came with it and another 100 MB drive that I added later. Because of this, I wrote COLORS so that it would run very nicely on my machine, without much regard of how well it does on older machines. My inclination is to say yes, it will work just fine. However, I don't have access to, say, a 500 with just 512k in it. I can tell you this: It doesn't take up all that much memory (the program itself is 156,000 bytes or so (it was squashed to save disk space to 93,000), and while it's running I don't think it takes over 300,000), and the game is slowed down using vertical blank period waits. So while the 3000 can process everything really fast, it still has to wait up to 1/50th of a second at certain points, allowing (hopefully) enough time for other machines that can't process as fast to catch up. If any of you have a "lesser" machine, then please let me know how it works!! I may be able to change some things if it's necessary. But keep in mind I don't promise a thing. Because of the lack of 3000-only products, and because of the fact that most programs refuse to take advantage of any extra RAM you might have (they are all afraid of losing compatibility with all of the older machines and don't want to risk losing the market to people who don't want or can't afford the new suped-up machines), I really won't have too much sympathy. To be truthful, the game just turned out that it would probably work with older machines; I didn't design it to. All that matters to me is that it works great on a 3000 under Kickstart/Workbench 2.0. Enough said. This program is being distributed as SHAREWARE. This means, in case you don't know by now, that you may (and I really encourage you to) copy this and distribute it in anyway you want, provided the entire archive is intact. Also, you are free to "test" this program for as long as you see fit. However, the catch is that if you like it and use it a lot, then you are legally and morally obligated to pay the shareware registration fee of $10. If you do, then several things will happen: A) You will get any information on updates or anything like that should any be necessary. B) You will support the whole concept of shareware, which is basically to beat developers at their own game. By giving your money, you will encourage the production of quality programs at cheap prices (which is what everyone wants). If you don't, then people like me eventually tag on to big companies, and we charge you $39.95 per game. (Which is what no one wants, especially considering after you buy something, a lot of places won't let you return it.) C) You will feel much better than usual when you wake up the next morning. If you are really generous and send $20, then I'll give you a disk with the source code, both in ASCII and AMOS format. One important note about shareware: A lot of people distribute their programs for you to try but do annoying things to them, like include delay screens in them (JRComm is a great example of this) or disable the 'save' function (an ANSI screen editor I found once did this) or things like that that render the programs all but useless. I personally find this highly annoying. How can you really tell if the program really works or is going to help you that much if half of it doesn't work? Well, I have NEVER registered anything that was not fully there, and I don't think I ever will. Rest assured that this game is fully functional, and if you don't register it, it will still work fine. I would like you to register it, but there's not much I can do about it. Some legal stuff: This program has no warranty of any kind, and I cannot be held responsible for any damage to your computer as a result of its use. As far as I know, this program is bug-free except for things I have specifically mentioned in the versions or moreme file. Even then, they probably aren't all that bad. So, if you play this game while optimizing your hard drive or something like that and all of a sudden the computer hangs, nothing >I< can do about it. (But you shouldn't be doing anything else when you're doing an operation of that nature anyway!!) About the author: ================= I am currently a sophomore student at Virginia Polytechnic Institute and State University studying Computer Science. I live in scenic Warrenton, Virginia, about 50 minutes away from Washington, D.C. I have been involved with computers since about the 5th grade (about 10 years at this point). I still have an Apple //e with 128k RAM, 2 disk drives, and a 300 bps modem. Whee. I play the trumpet for the Marching Virginians, which is a lot of fun, and it'll be even more fun once we get a decent head coach for our football team which pretty much sucks right at the moment. During the summer, I'm a lifeguard and a swim team coach, which is also fun except for some of the parents I've come in contact with. The driving force behind this program was mainly the success of T*tris-like games and all of their cheap knockoffs. I guess you could say this program was sort of a meld of T*tris, Dr. M*rio, and Kl*x. Also, the quality of other shareware games in this genre is sorely lacking. Quattro is a fine example of this. And I figured if Quattro could make the AmigaWorld top-10 public domain game list, then I could probably write a game that might too. I could go on and on why I don't like Quattro, but I'll just leave it at a couple of things: You can't "slide" pieces into place because (I assume) he put his check loop for space underneath the piece before the end-of-time-to-move-the-piece-down- one-square. "Sliding" is a fairly essential part of the game and it doesn't require that much more effort to program it in. Also, I am a fairly good T*tris player, and once I started it at the beginner level and made it to round 14 or so. Each round gets faster and faster, as it should, but the last round the delay for the piece moving down one square was ZERO! Thus, as soon as the round started, every piece fell directly down (just like holding down the space bar), and the game was over. I find that totally unacceptable and just plain poor programming. I wrote a game that I like to play so that you'd like to play it. After all, if I don't enjoy the game, then why should you? I just hope you like it as much as I do. About AMOS: =========== AMOS has a few eccentricities about it that you should be aware of if you're not already. The most important one is that it does not use standard intuition routines. Basically what this means is that you can't use left-amiga-m or n or whatever to go back to Workbench. AMOS DOES multitask, however! If you want to switch between AMOS and Workbench, you press left-amiga-a. (For real fun, try holding these down! If you mess up your monitor, though, forget where you read this.) Please note that left-amiga-a will only work with the most recent run AMOS program. For example, if you have AMOS in memory, go back to Workbench and run Colors, then left-amiga-a will NOT cycle through all AMOS programs running, just Colors in this case. This also means that you can't use AMOS to write standard Workbench programs and utilities since you can't access the windows and Workbench screen and whatnot. Hopefully someday they'll make better use of (regular) intuition. One other important implication of this (that took me a LONG time to figure out): If you have a screen saver or screen blanker running in the background, then TURN IT OFF!! If you don't, then because of not using standard intuition, your screen blanker is sure to timeout and go into effect (since it can't read any mouse or keyboard input while AMOS is in front). What does this mean? Well, every screen saver/blanker that I know of turns off the mouse as well as the rest of the screen. The AMOS screen will not be affected, but screen savers turn off the mouse by turning off ALL sprites and bobs (blitter objects). This means, quite simply, that you cannot see the piece that's falling down until it's pasted on the screen (dropped all the way). If I used the mouse at all, then the mouse pointer would be gone as well. So don't leave them running! About this game: ================ After a year and a half at school, I have become convinced that there are two types of people: Those who like traditional T*tris (the versions available for home computers), and those who prefer the arcade version made by Atari. I myself am an arcade fan, but in respect for all of those people who say T*tris was MEANT to be played like it is on the home computer, I have included TWO versions of this game in one program! Not bad, eh? Endurance Game -------------- The main purpose of the endurance game is to go as long as you can by making as many lines as possible. You still get normal points for the different types of lines, but the end-of-game line bonus will usually net you most of your points. You may choose the starting level (ranges from 0, the slowest, to 9, the fastest). At level 0, you have one second before the piece falls one space, at level 9, 1/10th of a second. The game ends when the next piece cannot be placed on the screen. Arcade Game ----------- In this game, there are many rounds for you to complete, each round with a different challenge and goal. To complete the round, you simply have to achieve the goal. The three types of goals are: Lines: Get this many lines (it doesn't matter what type or how long). Points: Get this many points to advance. Obviously, large lines are helpful here. Diagonals: Get this many diagonal lines. Other lines still score, but don't count towards the goal. In many rounds, there are also some pre-configured boards just to mess you up a little bit. Some of them are quite hard to play on as well, but isn't that the point? Also, starting at round 10, there is a random element added to the game: extra colors thrown in every now and again. Basically, a column is chosen at random, and a randomly colored block is put on top of it, provided it isn't already too close to the top of the screen. In round 7, you are introduced to the block: a grey piece that just sits there. Blocks are immovable and they never clear if there are 4 or more in a row of them. Also, they don't fall, so once a block is down, nothing goes past it. Round 13 brings in random blocks. Blocks may appear ANYWHERE, even on squares where you already have a regular colored block. However, you are not doomed if a block is chosen to appear: There is a 50% chance that the square will be "eaten" instead. If a block already down is eaten, then everything will fall. Every now and again, you'll get lucky and a random block or color will complete a line for you. Keep in mind that this is totally random, so there is no "screw the player" algorithm in this game to mess up that 7-long diagonal you were about to make. (If something screws you up, it was just plain dumb luck!) Random colors and blocks will not appear right after you make one or more lines. This is to give you a fair chance at completing a round. Believe it or not, I used to have colored blocks appear anywhere as well, and any block would appear anywhere anytime. This led to mass chaos, and the game became way too random to be playable at high rounds. So if you're starting to get into a tight situation, then you should start clearing lines to avoid getting blocks and colors thrown at you. At about round 25 (random colors and blocks, starting color configuartions), this becomes very necessary. It's hard to get the line you want for 20,000 points to get past that 45,000 points level. The initial speed of a level is determined by what round you started on, and how many rounds you have completed so far. So round 19 will be VERY fast if you started at round 1, but fairly slow if that's the round you start on. Also, the level speeds up as the number of pieces you've used so far increases. Game Play --------- The pieces will start horizontal at the middle of the top row. If any one of these 3 squares is taken up before a piece is to be started there, the game ends. You may rotate the pieces and move them left and right in the playing area. Hitting the speed down key does just that: Makes the piece fall rather quickly. In order to score the maximum points for a drop, the key must be held down until the piece falls all the way (you hear the drop noise). If you let it go halfway down, you only get the points from where you start pressing it again. The piece will continue to fall until it hits another piece already on the board or a block. Any color block that's suspended in midair (unless it's above a grey block) will continue to fall downward. You don't have any control over the piece as soon as it splits. You also only get points for where it fell before it split. This may take a little getting used to, but it makes the more interesting (and a hell of a lot easier and faster for me to program). There are a ton of ways to score points in this game. However, that's what makes this game so different from most other games. Some games (like Columns) have ridiculously simple scoring: one point for the first each of the first three blocks, two points for each one after that. Well, that's pretty boring and not much of a strategist's game. Here are all the ways you can score: Fall: The easiest way possible to score. You get points for how far down you drop a piece. The further it falls, the more points you get. As noted above, you only get as many points for dropping a piece from where you start pushing it down. Lines: The basic point of the game. The bigger the line, and depending on what type it is, the more points you get. Here is a scoring rundown: Line type/# blocks | 4 5 6 7 8 9 -------------------+--------------------------------------- Vertical | 100 1000 2500 5000 7500 10000 | Horizontal | 500 1500 3000 5000 9000 15000 | Diagonal | 1000 2500 5000 10000 25000 50000 Colors bonus: This is very important, since it is another major goal of the game. If you only clear one color on a drop, you get normal points. However, for each color above one that you clear on a SINGLE piece drop, the total line points you get is doubled. So if you cleared two colors, you would get 2x's the score, all four colors would be 8x's the score. Line bonus: This is a "progressive" bonus. That means the more times you get it, the more points you get for each time. If you are good at setting up "chain reactions," then this is for you. You get a bonus for each line above one you clear for a single drop of a piece. The first line above one you clear is worth 500 points, and the value of the bonus goes up 500 for each line thereafter. Thus, the second one would be worth 1000, the third 1500, etc. This is cumulative, so clearing three lines would be worth 1500 bonus points (one line worth 0, the second worth 500, the third worth 1000). Four lines cleared would be worth 3000, five would be 5000, etc. I have gotten 10,500 a couple of times, but never above that. (That's a total of 7 lines on a single drop!) This bonus is not affected by the color bonus. End-of-game line bonus: This is applicable to the endurance game only. As the name implies, it is given at the end of the game. This is to offset the heavy scoring possible by length and colors bonuses. Since the main objective is to make as many lines as possible, I decided to add this to make each line worth a bit more. Getting a 9-long diagonal with all four colors is worth well over 400,000 points. But getting about 120 lines in one game is worth around 700,000-800,000 points. This is also a progressive bonus. The first line you make is scored as 50 points plus 5 points times the level number you started on. If you started at level 5, the first line would be worth 75 points. This score is added to the bonus points for the next line, like the line bonus above. So if you started a game at level 6 and only got 4 lines (a fairly sad game), then you'd get 80+160+240+320=800 points. Usually, you'll get a bit more than 4 lines, so this bonus is very significant, especially if you get, say, 150 lines. End-of-round bonus: This is applicable to the arcade game only. This bonus is a total of four individual bonuses: - Round bonus: Quite simply, 1000 times the round number. - Over bonus: This depends on the goal. For line rounds, 1000 points for each extra line you clear. For point rounds, the number of points over the goal you went, rounded DOWN to the closest 100, and is limited to 50,000. For diagonal rounds, 2500 for each diagonal over the goal. - Clear bonus: Another progressive bonus. The base score is the round number divided by 2. You get the base score for the first clear square there is, and the bonus for each square is increased by the base for each clear square. Any 1/2 points are disregarded. So, after clearing round one, the first few empty squares are worth 0, 1, 1, 2, 2, etc. Round 2 would be worth 1, 2, 3, 4, 5... Round 10 would be worth 5, 10, 15, 20... This is done for each empty square you have at the end of the round. - Block bonus: Compensation for the difficulty of blocks. 200 for each one on the screen at the end of the round. All of these points are shown when you get them on the right half of the screen. Also on the right half is the NEXT display which shows the piece you'll get next, obviously. To the right of NEXT: is a number in parentheses. This is the piece number of the next piece. If there's a 13 there, that'll be the 13th piece you've played. For the endurance game, this is cumulative the whole game. It is reset each round for the arcade game. After the game is over, you'll be presented with a new screen giving you your final score, the total number of lines you had, and your rank. Separate high score charts are kept for endurance and arcade games. If you're in the top 20, you'll be prompted to enter your name. Anything more than 13 characters will be cut off. The game keeps track of the top 100 scores, so you'll still get a good idea of how well you did if you don't make the top 20. Currently there is no way to see the other 80 scores. If you don't make the top 100, you'll know about it. After the rank screen, you'll be presented with the high score chart for the game you were playing. If you made top 20, your score will be flashing in pretty colors. Also, your rank is shown at the bottom of the screen. Hit a key to go back to demo mode. The score and number of lines and game type of the last game you played are now shown at the top of the title page. Your rank will still be shown for your last game on the appropriate high score page during demo mode as well. Game Controls ------------- Keep in mind that you can hold down these keys and the effect will be repeated depending on your preferences settings from Workbench. The exceptions to this are the speed down keys. As long as your finger is on them they will fall. I almost put joystick control in this game, but then I thought: Why? So I didn't. If there's enough demand, then I will. Keypad Arrow keys Move left: 4 left-arrow Move right: 6 right-arrow Rotate piece: 5 down-arrow Speed down: 2 space bar Pause: ESC Kill game: ctrl-c You can use these keys interchangeably if you want. I.e. you can use 4, 5, 6 to move the piece and space bar to speed it down if you want. Also, for highly technical reasons, partially because of my laziness, and partially for execution speed for "lesser" computers, ANY 4, 5, and 6 key will move the piece, but ONLY the 2 key on the keypad will speed it down. If you desperately need or want different controls, I can fix it easily enough. Note that alternate keymaps will NOT work, because I have the standard U.S.A. keymap defined in this program. So changing the keymap in preferences will have totally NO effect on Colors. There are some keys that work in the demo mode as well: space bar: advance demo one page E: start endurance game A: start arcade game Q: quit game ctrl-c: kill game (works ANYtime) any other key: go back to title page If you hit ctrl-c, you interrupt the program no matter what it's doing and abort it. If you hit it during a game, everything you did will be lost. If you hit it before the high score screen shows up after a game, your score won't be saved (probably). If I were you, I'd just avoid using this key unless you're really in a hurry. Closing ======= Well, that's about all I have to say. You can get in touch with me at one of the following places: Internet: kjohnson@csugrad.cs.vt.edu Snailnet: Keith Johnson 5404 Nuthatch Ct. Warrenton, VA 22186 This is my home address, by the way, because I don't see any reason why you'd want to write me at school. Chances are I'll be living off campus next year, so the address in here wouldn't last very long. Please distribute this product! If it gets on Compuserve or GEnie or whatever, great! I'd do it myself if I had access, but I don't, so please someone out there put it up! If it gets to Fred Fish or another PD library, great. Good luck and have fun!